Gopher Proxy
jan.bio:70 jan.bio:70/0/til/bash/repeating-a-command-with-sudo.txt
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Repeating a command with sudo
Sometimes I forget to run a command as sudo. Bash comes to help and can
repeat the previous command:
$ pacman -Suy docker
Sorry, you need to be root to execute docker.
$ sudo !!
sudo pacman -Suy docker
[sudo] passord for jans:
...
$
!! can also be used to repeat the previous command.
you're on jan.bio^70/0/til/bash/repeating-a-command-with-sudo.txt
back link is jan.bio:70/1til